home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / batutl2.zip / SEND.DOC < prev    next >
Text File  |  1986-08-15  |  27KB  |  469 lines

  1.    ¢4 L                                   SEND.COM 1.6
  2.  
  3.  
  4.          INTRODUCTION
  5.  
  6.                SEND.COM is an enhanced version of the ECHO command, ideal
  7.          for sending escape sequences to the printer or screen.  The
  8.          documentation is primarily a tutorial on ECHO, SEND and redirection
  9.          of output.  If you already feel expert on ECHO and redirection, you
  10.          can skip to the final SUMMARY section to get a short manual on
  11.          SEND.
  12.                SEND, its source code, documentation, and demonstration files
  13.          are copyright 1985 by Howard Rumsey and Barry Simon.  They are
  14.          placed in public domain with one restriction and may be used for any
  15.          purpose including commercial use.  It is recomended that the the
  16.          full set of files be distributed together.  The sole restriction
  17.          is that the two files with copyright notices must be distributed
  18.          with these copyright notices.
  19.                Version 1.5 differs from the unnumbered version 1.0 by
  20.          including discussion of redirection of send through COMMAND.COM and
  21.          additional $<Cap Letters> commands.
  22.                SEND.COM was written by Howard Rumsey.  The source file is
  23.          found on the disk together with several demonstration files:
  24.                MONODEMO.BAT
  25.                COLORDEM.BAT
  26.                KEYRD.BAT
  27.                KEYOFF.BAT
  28.                PRINTDEM.BAT
  29.          The first four require you to have installed ANSI.SYS via your
  30.          CONFIG.SYS file.  The first two illustrate the use of SEND with
  31.          monochrome and color monitors respectively.  Keyrd will redefine
  32.          your F9 key to mean "dir" followed by <Enter> and F10 to mean "cls"
  33.          followed by <Enter>.  Keyoff returns the keys to their original
  34.          meaning.  The final batch file will illustrate the use of SEND if
  35.          you have an IBM graphics or compatible printer attached to LPT1.
  36.          This batch file can be run on either monitor, but if you have a
  37.          color monitor, you should run it with that as tne active monitor.
  38.          The demonstration files and this documentation were written by
  39.          Barry Simon.
  40.                The following files are also included:
  41.                BOLDPRN.BAT: Uses SEND to printout a file of your choice in
  42.                    boldprint on an IBM printer.  Type in the command
  43.                        "boldprn 'filename'"
  44.                TRIAL.TXT: Used in printdem to illustrate boldprn.bat
  45.                ANSISYS.ART: An article by B. Simon, which first appeared in
  46.                    the CAPITOL PC Monitor which describes the use of
  47.                    ANSI.SYS.
  48.          The batch files have numerous remarks embedded in them and you
  49.          should copy them to your printer.  You should note that you
  50.          couldn't do that if these batch files had used ECHO and embedded
  51.          escape characters rather than SEND!
  52.                These programs are hereby placed in the public domain.
  53.  
  54.                Comments on this program can be sent to:
  55.                   Barry Simon                      Howard Rumsey
  56.                   Caltech 253-37         or        Caltech 158-79
  57.                   Pasadena, CA 91125               Pasadena, CA 91125
  58.                                                    CompuServe 72426,3722
  59.                This documentation can be printed out by turning on your
  60.          printer, making sure that the paper is properly aligned and typing
  61.          "copy send.doc prn" at a DOS prompt.  If you have an IBM graphics
  62.          printer, you can get an even nicer copy by typing "boldprn send.doc"
  63.          at the DOS prompt.
  64.  
  65.  
  66.          INSTALLING SEND.COM
  67.                Some effort has been expended to keep SEND.COM under 512
  68.          bytes so it takes up only one sector if you have a floppy based
  69.          system.  In that case, you need to copy SEND.COM to your utility
  70.          disk.  SEND is not resident so the disk needs to be present
  71.          whenever SEND is invoked.  On a hard disk system copy SEND.COM to a
  72.          directory which is one of your DOS path search directories set by
  73.          the PATH command.
  74.  
  75.  
  76.          USING ECHO
  77.                You may be used to exploiting ECHO in your batch files but
  78.          may not be aware that it can be invoked from the DOS command line.
  79.          If that is the case, type in at the DOS prompt:
  80.                echo hello
  81.          You need to also hit <Enter> but I won't keep saying that.  The
  82.          response is amusing but not useful.  Next try:
  83.                echo hello > prn
  84.  
  85.                                       SEND  page 2
  86.  
  87.  
  88.          More interesting!  Still not so useful but at least if you ever
  89.          want to use your printer as a typewriter (why anyone would want to
  90.          do this in preference to using a real word processor is beyond me!)
  91.          you can do it yourself without needing a BASIC program which does
  92.          precisely that.
  93.                Now try
  94.                echo <Ctrl G>
  95.          where "<Ctrl G>" means to hit a "control-G", that is to depress the
  96.          <Ctrl> key and strike the G and try
  97.                echo <Ctrl G> > prn
  98.          These are decidedly more interesting and you may even think of some
  99.          uses for them in batch files!
  100.                Next try turning off your printer, carefully aligning your
  101.         printer paper, turning your printer back on and typing
  102.                echo <Ctrl L> > prn
  103.          <Ctrl L> is the command to send a "top of form" to your printer but
  104.          if you look carefully you will discover that more than a top of
  105.          form was sent to the printer.  ECHO automatically inserts a
  106.          carriage return-line feed pair (CR-LF) to the end of any line so
  107.          your last command first sent a top of form but then advanced the
  108.          paper one additional line.  Annoying, isn't it?
  109.                Next try:
  110.                echo <Esc>
  111.          and
  112.                echo <Ctrl [>
  113.          (Escape and Control-[ are the same).  This doesn't do what you
  114.          might hope.  <Esc> is interpreted by DOS as a desire on your part
  115.          to abort the present command and thus you cannot use ECHO at the
  116.          command line to send an <Esc> to either the screen or your printer.
  117.          This is unfortunate since ANSI.SYS allows you to do all
  118.          sorts of nice things if you send the proper "escape sequences" to
  119.          the screen and many printers can be told to turn on boldface or
  120.          other neat things by sending escape sequences to them.  You can
  121.          send such sequences to the printer by using some word processors
  122.          (even EDLIN (ugh!) if you use its <Ctrl V> feature) to make a file
  123.          with embedded escape characters which you can copy to your printer.
  124.          But you then need to have these files around and you have files
  125.          with embedded control characters which you may have trouble
  126.          printing out or sending over a modem.
  127.                SEND is intended to remedy these defects of ECHO:
  128.                1. It does not terminate line in a CR-LF combination; one can
  129.                  add such a pair "by hand".
  130.                2. Typing "send ^G" is equivalent (except for the lack of a
  131.                  CR-LF) to typing "echo <Ctrl G>" so one need not fill files
  132.                  with control characters.
  133.                3. Typing "send ^[E > prn" will send a <Esc>E to the printer
  134.                  thereby turning on "emphasized" print.
  135.          In addition, as will be explained, SEND supports the PROMPT $-
  136.          characters.
  137.  
  138.  
  139.          SEND: CONTROL CHARACTERS
  140.                SEND works much like ECHO but if the string to be echoed
  141.          includes the caret (<Shift 6> which appears as ^), different rules
  142.          apply.  SEND will replace ^a by the character <Ctrl A> (ASCII 1),
  143.          etc.  ^ followed by any letter is replaced by the corresponding
  144.          control character whether the letter is upper case or lower case.
  145.          The remaining control characters:
  146.                ^@=ASCII 0